#ifndef PROXYPROMPTDIALOG_H
#define PROXYPROMPTDIALOG_H

/**
Nectarine Utility Project is a software interface for the web system 'demovibes'
Copyright (C) 2010  Alexandre LAURENT

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

website: http://code.google.com/p/nectarine-utility-project/
e-mail: lw.demoscene@gmail.com
**/


#include <QDialog>

#include <QNetworkProxy>
#include <QComboBox>
#include <QSpinBox>
#include <QLineEdit>

class QVBoxLayout;
class QHBoxLayout;
class QLabel;

class ProxyPromptDialog : public QDialog
{
    Q_OBJECT

private:

    QVBoxLayout* pMainGrid;

    QComboBox* pProxyTypeBox;

    QHBoxLayout* pHostGrid;
    QLabel* pHostLabel;
    QLineEdit* pHostInput;
    QSpinBox* pPortBox;

    QHBoxLayout* pLoginGrid;
    QLabel* pLoginLabel;
    QLineEdit* pLoginInput;

    QHBoxLayout* pPasswordGrid;
    QLabel* pPasswordLabel;
    QLineEdit* pPasswordInput;

    QHBoxLayout* pButtonGrid;
    QPushButton* pOkButton;
    QPushButton* pCancelButton;

protected slots:

    void accept(void);

signals:

public:
    explicit ProxyPromptDialog(QWidget *parent = 0);
    ~ProxyPromptDialog(void);

    const QNetworkProxy::ProxyType getProxyType(void)const { return static_cast<QNetworkProxy::ProxyType>(pProxyTypeBox->itemData(pProxyTypeBox->currentIndex()).toInt()); }
    const QString getHost(void)const { return pHostInput->text(); }
    const int getPort(void)const { return pPortBox->value(); }
    const QString getLogin(void)const { return pLoginInput->text(); }
    const QString getPassword(void)const { return pPasswordInput->text(); }
};

#endif // PROXYPROMPTDIALOG_H
